<?php

use yii\db\Migration;

class m180330_081822_update_menu extends Migration
{
    public function safeUp()
    {
        $this->update('{{%menu}}',['icon'=>'fa-users'],['name'=>'会员管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-book'],['name'=>'课程管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-cc-visa'],['name'=>'财务结算','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-coffee'],['name'=>'商品管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-gift'],['name'=>'活动管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-reorder'],['name'=>'订单管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-institution'],['name'=>'机构管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-bar-chart'],['name'=>'统计管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-credit-card'],['name'=>'卡管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-cogs'],['name'=>'系统设置','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-graduation-cap'],['name'=>'班级管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-tags'],['name'=>'券管理','module'=>'branch','parent_id'=>0]);
        $this->update('{{%menu}}',['icon'=>'fa-tachometer'],['name'=>'评价管理','module'=>'branch','parent_id'=>0]);
    }

    public function safeDown()
    {
        echo "m180330_081822_update_menu cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m180330_081822_update_menu cannot be reverted.\n";

        return false;
    }
    */
}
